90101: All tests

Documentation

This file documents all of the conformance suite tests for the xfi:facts-in-instance function. Tests still to be done: Error thrown when using the wrong argument - not an xbrli:xbrl element. Error thrown when supplying a sequence of nodes as the argument.

Owners

Name Affiliation Email Start End
Geoff Shuetrim Galexy geoff@galexy.net 30-01-2008 at 00:00:00

Test Case Variations


V-01 Works for an instance with one fact.

Documentation

Tests that the function returns the correct facts for an instance with one fact.

Inputs

Outputs

  • Result test: count( $result ) eq 1
  • Result test: local-name( $result ) eq 'c1'
  • Result test: namespace-uri( $result ) eq 'http://xbrl.org/formula/conformance/example'
  • Result test: $result instance of element(concept:c1,xs:string) and data( $result ) instance of xs:string

V-02 Works for an instance with no facts.

Documentation

Tests that the function returns the correct facts for an instance with no facts.

Inputs

Outputs

  • Result test: count( $result ) eq 0

V-03 Works for an instance with several facts.

Documentation

Tests that the function returns the correct facts for an instance with one fact.

Inputs

Outputs

  • Result test: count( $result ) eq 3 and (every $node in $result satisfies $node instance of element(concept:c1,xs:string) and data($node) instance of xs:string)

V-04 Works for an instance with tuples.

Documentation

Tests that the function returns the correct facts for an instance with tuples. This instance includes nil tuples and tuples within tuples and items within tuples.

Inputs

Outputs

  • Result test: count( $result ) eq 5 and (every $node in $result satisfies if (local-name($node) eq 'c1') then ($node instance of element(concept:c1,xs:string) and data($node) instance of xs:string) else true())

V-05 Works for an instance with facts of different data types.

Documentation

Tests that the function returns the correct facts for an instance and that each has proper type and PSVI atomicity type for typed operations.

Inputs

Outputs

  • Result test: count( $result ) eq 4 and (every $node in $result satisfies if ($node/@id eq 'a') then ($node instance of element(concept:c1,xs:string) and data($node) instance of xs:string) else if ($node/@id eq 'b') then ($node instance of element(concept:i1,xs:integer) and data($node) instance of xs:integer and $node+1 eq 12346) else if ($node/@id eq 'c') then ($node instance of element(concept:d1) and data($node) instance of xs:date and $node eq xs:date('2007-12-31')) else if ($node/@id eq 'd') then ($node instance of element(concept:d1) and data($node) instance of xs:dateTime and $node eq xs:dateTime('2007-12-31T12:30:40')) else false())

Revisions

Name On Details
Geoff Shuetrim 30-01-2008 at 00:00:00 Created the test case.
01-09-2008 at 00:00:00 Added variation with nils.
05-12-2008 at 00:00:00 Added variations with integer and dateUnion, added data type verification.